<?php

class FP_Auth_Cookie_Adapter implements Zend_Auth_Adapter_Interface {

	protected $user = null;

	public function __construct($pUserId){
	    $Users      = new FP_Users();
	    $this->user = $Users->fetch($pUserId);
	}

	public function authenticate(){
	    if ($this->user){

		return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $this->user);
	    } else
		return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND, null);
	}

}

?>